package com.itheima.map;

import java.util.HashMap;
import java.util.Map;

public class MapDemo04 {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("柳岩",2100);
        map.put("张亮",1700);
        map.put("诸葛亮",1800);
        map.put("灭绝师太",2600);
        map.put("东方不败",3800);
        if (map.containsKey("柳岩")) {
            Integer value = map.get("柳岩");
            value += 300;
            map.put("柳岩",value);
        }
        map.forEach((k,v)-> System.out.println(k+"-->"+v));

    }
}
